let project_count  = 0;

export default {
  'GET /projects' : function (req, res){
    console.log('GET /projects');
    var projectId  = "2019042400" + project_count;
    const respObj  = {
      count: 2,
      items:[
        {
          projectId : '2019042400',
          customer: '浦口陈冠希',
          production: '两个棒棒糖',
          region: '南京',
          linkman: '赵钱孙',
          phone:'13814815817',
          drawingNum: 1,
          offerNum: 2,
          contractNum:0,
          logNum: 5,
          state: 1,
          tagList:["1", "2", "4"]
        },
        {
          projectId : '2019042401',
          customer: '六合周润发',
          production: '三个诸葛亮',
          region: '南京',
          linkman: '周吴郑',
          phone:'13814815817',
          drawingNum: 3,
          offerNum: 1,
          contractNum:1,
          logNum: 3,
          state: 1,
          tagList:["1", "2", "4"]
        },
      ]
    };

    res.status(200);
    res.json(respObj);

  },

  'POST /projects' : function(req, res){
    var projectId  = "2019042410" + project_count;
    console.log(projectId);
    console.log(req);
    project_count++;
    res.status(200);
    res.json({
        projectId : projectId,
        customer: '浦口陈冠希',
        production: '两个棒棒糖',
        region: '南京',
        linkman: '赵钱孙',
        phone:'13814815817',
        drawingNum: 1,
        offerNum: 2,
        contractNum:0,
        logNum: 5,
        state: 1,
        tagList:null
    });
  }
};
